﻿<Window 
    x:Name="ToolBarWindow"
    x:Class="iCloudPortal.ToolbarWindow" 
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
    Title="Windy's iCloud Portal Toolbar" 
    Width="{DynamicResource {x:Static SystemParameters.PrimaryScreenWidthKey}}" 
    Height="25"
    Top="{Binding ElementName=ToolBarWindow, Path=ActualHeight, Converter={StaticResource WindowShiftConverter}}" 
    Left="0" 
    ResizeMode="NoResize" 
    WindowStyle="None" 
    Topmost="True"
    Cursor="Hand"
    ShowInTaskbar="False"
    >
    <Window.Triggers>
        <EventTrigger RoutedEvent="Mouse.MouseEnter">
            <BeginStoryboard>
                <Storyboard>
                    <DoubleAnimation 
                                To="0" 
                                Duration="0:0:0.5" 
                                Storyboard.TargetProperty="Top"/>
                </Storyboard>
            </BeginStoryboard>
        </EventTrigger>
        <EventTrigger RoutedEvent="Mouse.MouseLeave">
            <BeginStoryboard>
                <Storyboard>
                    <DoubleAnimation 
                            To="{Binding ElementName=ToolBarWindow, Path=ActualHeight, Converter={StaticResource WindowShiftConverter}}" 
                            Duration="0:0:0.5" 
                            Storyboard.TargetProperty="Top"/>
                </Storyboard>
            </BeginStoryboard>
        </EventTrigger>
    </Window.Triggers>

    <ToolBarPanel x:Name="ToolBarPanel">
        <ToolBar x:Name="ToolBar">
            <Button Click="HomeButton_Click">Home</Button>
            <Button Click="RefreshButton_Click">Refresh</Button>
            <Separator />
            <Button Click="ExitButton_Click">Exit</Button>
        </ToolBar>
    </ToolBarPanel>
</Window>
